/* -*- c++ -*- */
/*
 * This file is part of the SD Project.
 *
 * Authors: Cleiber Marques da Silva <cleiber@lisha.ufsc.br>
 * 			Odilson Tadeu Valle <odilson@sj.ifsc.edu.br>
 * 
 * SD Project is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; version 2 of the License.
 */

#include "clock.h"

namespace sd {
	clock::clock(int num)
	{
		for (int i = 0; i < num; i++)
			timestamp.push_back(0);
	}

	int clock::get_timestamp(int id)
	{
		return timestamp[id];
	}

	void clock::inc_timestamp(int id)
	{
		timestamp[id]++;
	}

	void clock::update_timestamp(int id, int value)
	{
		timestamp[id] = value;
	}
}
